<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="libman.css">
<TITLE>
External Solver Output and Log
</TITLE>
</HEAD>
<BODY >
<A HREF="libman058.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman060.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc133">9.7</A>&nbsp;&nbsp;External Solver Output and Log</H2>
The external solver's output can be controlled using:
<DL CLASS="description" COMPACT=compact><DT CLASS="dt-description">
<B><TT>lp_set(SolverChannel, +(Stream))</TT></B><DD CLASS="dd-description">
Send output from SolverChannel to the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> I/O stream Stream.
<DT CLASS="dt-description"><B><TT>lp_set(SolverChannel, -(Stream))</TT></B><DD CLASS="dd-description">
Stop sending output from SolverChannel to the ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> I/O stream Stream.
</DL>
SolverChannel is one of
<TT>result_channel, error_channel, warning_channel, log_channel</TT>,
and Stream is an ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> stream identifier (e.g. <TT>output</TT>,
or the result of an open/3 operation).
By default, <TT>error_channel</TT> is directed to ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>'s <TT>error</TT> stream,
<TT>warning_channel</TT> to <TT>warning_output</TT> stream,
while <TT>result_channel</TT> and <TT>log_channel</TT> are suppressed.
To see the output on these channels, do for instance
<PRE CLASS="verbatim">
:- lp_set(result_channel, +output), lp_set(log_channel, +log_output).
</PRE>Similarly, to create a log file:
<PRE CLASS="verbatim">
:- open("mylog.log", write, logstream), lp_set(log_channel, +logstream).
</PRE>and to stop logging:
<PRE CLASS="verbatim">
:- lp_set(log_channel, -logstream), close(logstream).
</PRE>
<HR>
<A HREF="libman058.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="libman052.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="libman060.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
